package com.jams.goodox.net.services;

import com.jams.goodox.constant.UrlConstants;
import com.jams.goodox.entity.resp.CheckCompanyResp;
import com.jams.goodox.entity.resp.CooperationResp;
import com.jams.goodox.entity.resp.EnterpriseContactsResp;
import com.jams.goodox.entity.resp.EnterpriseDirResp;
import com.jams.goodox.entity.resp.EnterpriseFieldResp;
import com.jams.goodox.entity.resp.EnterpriseFinancialListResp;
import com.jams.goodox.entity.resp.EnterpriseLendListResp;
import com.jams.goodox.entity.resp.EnterpriseMentorListResp;
import com.jams.goodox.entity.resp.EnterpriseResp;
import com.jams.goodox.entity.resp.EnterpriseStageResp;
import com.jams.goodox.entity.resp.ExternalListRep;
import com.jams.goodox.entity.resp.FinancialDetailsResp;
import com.jams.goodox.entity.resp.FinancialFirstPageResp;
import com.jams.goodox.entity.resp.InvoiceResp;
import com.jams.goodox.entity.resp.LabelsResp;
import com.jams.goodox.entity.resp.LendFirstPageResp;
import com.jams.goodox.entity.resp.LoanDetailsResp;
import com.jams.goodox.entity.resp.LogisticsResp;
import com.jams.goodox.entity.resp.MentorIntroduceResp;
import com.jams.goodox.entity.resp.NewsDetailResp;
import com.jams.goodox.entity.resp.NumberOfAuthorizationResp;
import com.jams.goodox.entity.resp.OneKeyServiceResp;
import com.jams.goodox.entity.resp.PartyItemListResp;
import com.jams.goodox.entity.resp.PartyWorkResp;
import com.jams.goodox.entity.resp.PolicyDetailResp;
import com.jams.goodox.entity.resp.PolicyItemListResp;
import com.jams.goodox.entity.resp.ProjectFinancialDetailResp;
import com.jams.goodox.entity.resp.ProjectTypeResp;
import com.jams.goodox.entity.resp.ReviewAuthorizationResp;
import com.jams.goodox.entity.resp.ServerListResp;
import com.jams.goodox.net.BaseEntity;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.DELETE;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * 作者：dell on 2017/6/1 15:36
 * 功能描述: 企业服务相关
 */

public interface EnterpriseService {


    /*********************************************************导师 *****************************************
    /**
     * 获取导师列表List(分页)
     */
    @GET(UrlConstants.enterpriseMentor + "guiderList")
    Call<EnterpriseMentorListResp> getMentorList(@Query("curPage") int curPage, @Query("pageSize") int pageSize);

    /**
     * 通过导师ID获取企业导师详情
     */
    @GET(UrlConstants.enterpriseMentor + "guider/{id}")
    Call<MentorIntroduceResp> getMentorById(@Path("id") String id);


    /********************************************************理财****************************************
    /**
     * 获取园区营业部理财产品列表(分页)
     */
    @GET(UrlConstants.enterpriseFinance + "communityManageList")
    Call<EnterpriseFinancialListResp> getParkFinancialList(@Query("curPage") int curPage, @Query("pageSize") int pageSize);

    /**
     * 获取其它营业部理财产品列表(分页)
     */
    @GET(UrlConstants.enterpriseFinance + "otherManageList")
    Call<EnterpriseFinancialListResp> getOtherFinancialList(@Query("curPage") int curPage, @Query("pageSize") int pageSize);

    /**
     * 获取理财产品详情
     */
    @GET(UrlConstants.enterpriseFinance + "communityManageDetail/{manageProductId}")
    Call<FinancialDetailsResp> getFinanceProduct(@Path("manageProductId") String id);

    /**
     * 获取理财产品首页
     */
    @GET(UrlConstants.enterpriseFinance + "firstPage")
    Call<FinancialFirstPageResp> getFinancialFirstPage();


    /**********************************************************贷款****************************************
    /**
    *贷款首页
    */
    @GET(UrlConstants.enterpriseLoan + "firstPage")
    Call<LendFirstPageResp> getLendFirstPage();
    /**
     * 获取园区营业部贷款列表(分页)
     */
    @GET(UrlConstants.enterpriseLoan + "communityLendList")
    Call<EnterpriseLendListResp> getParkLendList(@Query("curPage") int curPage, @Query("pageSize") int pageSize);

    /**
     * 获取其它营业部理贷款列表(分页)
     */
    @GET(UrlConstants.enterpriseLoan + "otherLendList")
    Call<EnterpriseLendListResp> getOtherLendList(@Query("curPage") int curPage, @Query("pageSize") int pageSize);

    /**
     * 获取贷款详情
     */
    @GET(UrlConstants.enterpriseLoan + "communityLendDetail/{lendProductId}")
    Call<LoanDetailsResp> getLendProduct(@Path("lendProductId") String id);

    /***********************************项目融资*******************************************************
    /**
     * 公司所处阶段列表
     */
    @GET(UrlConstants.enterpriseProjectFinancial + "companyLevel")
    Call<EnterpriseStageResp> getEnterpriseStage();

    /**
     * 公司所属领域
     */
    @GET(UrlConstants.enterpriseProjectFinancial + "companyDomain")
    Call<EnterpriseFieldResp> getEnterpriseDomain();

    /**
     * 项目融资情况
     */
    @GET(UrlConstants.enterpriseProjectFinancial + "getProjectDetail")
    Call<ProjectFinancialDetailResp> getProjectDetail();

    /**
     * 公司项目类型
     */
    @GET(UrlConstants.enterpriseProjectFinancial + "projectType")
    Call<ProjectTypeResp> getEnterpriseProjectType();

    /**
     * 项目融资提交
     */
    @PUT(UrlConstants.enterpriseProjectFinancial + "project")
    Call<BaseEntity> submitProjectFinancial(@QueryMap Map<String, String> map);


    /*******************************审核授权管理*****************************
    /**
     * 修改通讯录开关
     */
    @PUT(UrlConstants.auditEnterprise + "maillist")
    Call<BaseEntity> switchContacts(@Query("enterpriseId") String enterpriseId, @Query("status") String status);

    /**
     * 员工审核
     */
    @PUT(UrlConstants.auditEnterprise + "employee/verify")
    Call<BaseEntity> checkStaff(@Query("enterpriseId") String enterpriseId, @Query("id") String id, @Query("status") String status);

    /**
     * 员工移除
     */
    @DELETE(UrlConstants.auditEnterprise + "employee/{id}")
    Call<BaseEntity> deleteStaff(@Path("id") String id);

    /**
     * 审核授权管理
     */
    @GET(UrlConstants.auditEnterprise + "employee/list")
    Call<ReviewAuthorizationResp> reviewAuthorization(@QueryMap Map<String, String> map);

    /**
     * 待审核人数
     */
    @GET(UrlConstants.auditEnterprise + "employee")
    Call<NumberOfAuthorizationResp> numberOfAuthorization(@Query("enterpriseId") String id);

    /**
     * 授权企业对外联系人
     */
    @PUT(UrlConstants.auditEnterprise + "employee/external")
    Call<BaseEntity> authorizeExternalContacts(@Query("externalContact") String externalContact,
                                               @Query("externalIdentity") String externalIdentity,
                                               @Query("id") String id
    );

    /**
     * 授权企业权限
     */
    @PUT(UrlConstants.auditEnterprise + "employee/represent")
    Call<BaseEntity> authorizeEnterprisePermission(@Query("id") String id, @Query("represent") String represent);

    /**
     *对外联系人岗位
     */
    @GET(UrlConstants.auditEnterprise+"external/identity/list")
    Call<ExternalListRep> externalList();
    
    
    //获取服务列表
    @GET(UrlConstants.getEnterpriseServer)
    Call<ServerListResp> getServerList(@Path("communityId") String communityId, @Path("section") String section);

    /**
     * 增值税专用发票
     */
    @PUT(UrlConstants.invoice + "special")
    Call<BaseEntity> specialInvoice(@QueryMap() Map<String, String> map);

    /**
     * 增值税普通用发票
     */
    @PUT(UrlConstants.invoice + "normal")
    Call<BaseEntity> normalInvoice(@QueryMap() Map<String, String> map);

    /**
     * 我的开票设定
     */
    @GET(UrlConstants.invoice)
    Call<InvoiceResp> myInvoice(@Query("userId") String userId);
    
    /**
     * 企业合作
     */
    @GET(UrlConstants.cooperation)
    Call<CooperationResp> enterpriseCooperation(@QueryMap Map<String,String> map);
    /**
     * 发布企业合作
     */
    @FormUrlEncoded
    @POST(UrlConstants.cooperation)
    Call<BaseEntity> publishEnterpriseCooperation(@Field("communityId") String communityId,
                                                  @Field("enterpriseId") String enterpriseId,
                                                  @Field("picIds") List<String> picIds,
                                                  @Field("topicContent") String topicContent,
                                                  @Field("topicTag") String topicTag
    );
    
    //http://192.168.20.20:8081/uama-town/v10/neighbors/type/cooperation
    /**
     * 发布企业合作帖子的 内容, "出售设备","求帮忙" 从后台获取
     */
    @GET(UrlConstants.APP_VERSION+"neighbors/type/cooperation")
    Call<LabelsResp> getLabels();
    

    /**
     * 党务信息
     */
    @GET(UrlConstants.partyWork + "queryTypeList")
    Call<PartyWorkResp> getPartyWorkData();

    /**
     * 根据类型获取党员服务信息(分页)
     */
    @GET(UrlConstants.partyWork + "getPartyworkList/{typeId}")
    Call<PartyItemListResp> getPartyItemList(@Path("typeId") String typeId,
                                             @Query("curPage") int curPage,
                                             @Query("pageSize") int pageSize);

    /**
     * 党务信息详情
     */
    @GET(UrlConstants.partyWork + "getPartyworkInfo/{id}")
    Call<NewsDetailResp> getPartyNewsDetail(@Path("id") String id);

    /**
     * ***热点
     */
    @GET(UrlConstants.townNews + "queryTypeList")
    Call<PartyWorkResp> getTownNewsData();

    /**
     * ***热点信息(分页)
     */
    @GET(UrlConstants.townNews + "getTownpointList/{typeId}")
    Call<PartyItemListResp> getTownNewsItemList(@Path("typeId") String typeId,
                                                @Query("curPage") int curPage,
                                                @Query("pageSize") int pageSize);

    /**
     * 党务信息详情
     */
    @GET(UrlConstants.townNews + "getTownpointInfo/{id}")
    Call<NewsDetailResp> getTownNewsDetail(@Path("id") String id);

    /**
     * 企业政策
     */
    @GET(UrlConstants.policy + "getPolicyType")
    Call<PartyWorkResp> getPolicyType();

    /**
     * 企业政策分页
     */
    @GET(UrlConstants.policy + "getPolicyListByPage/{typeId}")
    Call<PolicyItemListResp> getPolicyListByPage(@Path("typeId") String typeId,
                                                 @Query("curPage") int curPage,
                                                 @Query("pageSize") int pageSize);

    /**
     * 企业政策详情
     */
    @GET(UrlConstants.policy + "getPolicyDetailsInfo/{id}")
    Call<PolicyDetailResp> getPolicyDetailsInfo(@Path("id") String id);

    //获取个人企业数据
    @GET(UrlConstants.enterprise)
    Call<EnterpriseResp> getEnterprise(@Query("communityId") String communityId, @Query("userId") String userId);


    /**
     * 企业名录
     */
    @GET(UrlConstants.auditEnterprise + "external")
    Call<EnterpriseDirResp> getEnterpriseDir(@Query("communityId") String communityId, @Query("curPage") int curPage,
                                             @Query("pageSize") int pageSize);

    /**
     * 企业对外联系人
     */
    @GET(UrlConstants.auditEnterprise + "external/list")
    Call<EnterpriseContactsResp> getEnterpriseExternalList(@Query("enterpriseId") String enterpriseId);

    /**
     * 入口验校公司在黑名单
     */
    @GET(UrlConstants.checkCompanyStatus)
    Call<CheckCompanyResp> checkCompanyStatus(@Path("enterpriseId") String enterpriseId);

    /**
     * 获取行政后勤列表
     */
    @GET(UrlConstants.getLogisticsList)
    Call<LogisticsResp> getLogisticsList(@Path("section") String section);
    /**
     * 一键服务
     */
    @GET(UrlConstants.oneKeyService)
    Call<OneKeyServiceResp> getOneKeyService(@Query("subId") String subId);
}
